<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../common/vue.min.js" type="text/javascript"></script>
</head>
<body>
<!--view-->
<div id="e2">
    <p v-if="a">helllloword!!</p>

    <div>message {{a}}</div>
    <div>message never change:{{*a}}</div>
</div>

<script type="text/javascript">

    /**
     *
     */
    var vm = new Vue({
        el: '#e2', //el :element
        data: {
            a: true
        },
        //TODO 钩子是什么
        //vm实例创建后的钩子
        created: function () {
            console.log(this);//vm实例
            console.log("a1:" + this.a);
            console.log("a2:" + this.$data.a);
            console.log(this.a == this.$data.a);
        }
    })
    vm.$data.a = false;


</script>

</body>
</html>